
<link type="text/css" href="inc/rl.css" rel="stylesheet">

{[include file="emp/emp/_view.tpl"]}

<form id="form_edit" method="post" action="{[$root]}{[$postLink]}{[$p1]}{[$p3]}"><input type="hidden" name="id"
	value="{[$smarty.request.id]}" />
<table id="priv_add">
	<tr>
		<td colspan="3" align="left">查找：<input type="text" name="search" value="" id="search" size="16" /></td>
	</tr>
	<tr>
		<td align="center" width="45%">未分配权限</td>
		<td width="10%"></td>
		<td align="center" width="45%">已分配权限</td>
	</tr>
	<tr>
		<td height="200px" align="center">
		<select multiple="multiple" name="list[]" id="list" style="height: 100%; width: 100%;">
			{[foreach name=outer key=key item=item from=$result_all]}
			<option value="{[$item.id]}"{[$item.class]}>{[$item.no]}.{[$item.name]}/{[$item.cc]}/{[$item.action]}</option>
			{[/foreach]}
		</select></td>
		<td align="center" height="180px">
		<div id='rl'><a href="#" id="addT" class="button">&raquo;</a><br>
		<a href="#" id="addAllT" class="button">&raquo;&raquo;</a><br>
		<a href="#" id="removeT" class="button">&laquo;</a><br>
		<a href="#" id="removeAllT" class="button">&laquo;&laquo;</a></div>
		</td>
		<td height="200px" align="center"><select multiple="multiple" name="priv[]" id="priv"
			style="height: 100%; width: 100%;">
			{[foreach name=outer key=key item=item from=$result]}
			<option value="{[$item.id]}">{[$item.no]}.{[$item.name]}/{[$item.cc]}/{[$item.action]}</option>
			{[/foreach]}
		</select></td>
	</tr>
</table>
</form>

<script type='text/javascript'>

$(function() {
	$('#list').transfer({
		to: '#priv',
		searchId: '#search',
		dblClick: true,
		searchText: '{count} options matching {keyword}',
		searchTextId: '#searchText',
		addId: '#addT',
		removeId: '#removeT', 
		addAllId: '#addAllT', 
		removeAllId: '#removeAllT',
		tClass: 'added'
	});

});
</script>
